package com.settlement.system.mapper;

import com.settlement.system.model.entity.common.SinglePage;
import com.settlement.system.model.entity.common.TblRefundAuditBill;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.ResultHandler;

import java.util.List;
import java.util.Map;

/**
 * 退款稽核单据主表 Mapper 接口
 * @author xiaochuan
 * @since 2020-06-28
 */
public interface TblRefundAuditBillMapper extends BaseMapper {
    /**
     * updateByBillNo
     * @param bill
     * @throws Exception
     */
    void updateByBillNo(TblRefundAuditBill bill) throws Exception;

    /**
     * selectBillCount
     * @param params
     * @return
     * @throws Exception
     */
    int selectBillCount(@Param("params") Map<String, Object> params) throws Exception;

    /**
     * selectBillByPage
     * @param page
     * @param params
     * @param orderByField
     * @param orderBy
     * @return
     * @throws Exception
     */
    List<TblRefundAuditBill> selectBillByPage(@Param("page") SinglePage page, @Param("params") Map<String,Object> params,
                                              @Param("orderByField") String orderByField, @Param("orderBy") String orderBy) throws Exception;

    /**
     * updateRefundAuditCache
     * @param endMethod
     * @param billNo
     * @throws Exception
     */
    void updateRefundAuditCache(@Param("endMethod") int endMethod,@Param("billNo") String  billNo)throws Exception;

    /**
     * getDataBillByHandler
     * @param params
     * @param handler
     */
    void getDataBillByHandler(@Param("params")  Map<String, Object> params, ResultHandler<TblRefundAuditBill> handler);

    /**
     * getDataBillAndDtlByHandler
     * @param params
     * @param handler
     */
    void getDataBillAndDtlByHandler(@Param("params") Map<String, Object> params, ResultHandler<TblRefundAuditBill> handler);

}

